package constants

const (
	// 国家常量值
	CountryChina     = 1
	CountryAmerica   = 2
	CountryEngland   = 5 //增加的"英国"的枚举值
	CountryKorea     = 3
	CountrySingapore = 4

	// 国家常量值--改为存储字符串
	CountryStrChina     = "1"
	CountryStrAmerica   = "2"
	CountryStrEngland   = "5"
	CountryStrKorea     = "3"
	CountryStrSingapore = "4"
)

var (
	//国家常量映射关系--map存储
	CountryMap = map[int]string{
		CountryChina:     "中国",
		CountryAmerica:   "美国",
		CountryEngland:   "英国", //增加的"英国"排在"美国"下面
		CountryKorea:     "韩国",
		CountrySingapore: "新加坡",
	}
	CountrySort = []int{
		CountryChina,
		CountryAmerica,
		CountryEngland,
		CountryKorea,
		CountrySingapore,
	}

	//国家常量映射关系--切片存储
	CountrySlice = [][]string{
		{CountryStrChina, "中国"},
		{CountryStrAmerica, "美国"},
		{CountryStrEngland, "英国"},
		{CountryStrKorea, "韩国"},
		{CountryStrSingapore, "新加坡"},
	}

	//国家常量映射关系--切片存储-省去常量
	CountrySliceSimple = [][]string{
		{"1", "中国"},
		{"2", "美国"},
		{"5", "英国"},
		{"3", "韩国"},
		{"4", "新加坡"},
	}

	//国家常量映射关系--结构体存储
	CountryStruct = []struct {
		Id   int    `json:"id"`
		Name string `json:"name"`
	}{
		{CountryChina, "中国"},
		{CountryAmerica, "美国"},
		{CountryEngland, "英国"},
		{999, "法国"},
		{CountryKorea, "韩国"},
		{CountrySingapore, "新加坡"},
	}
)
